﻿@model SIFIET.Models.RegisterModel

@{
    ViewBag.Title = "Register";
}

<h2>Crear una nueva cuenta</h2>
<p>
    Utilice el siguiente formulario para crear una nueva cuenta. 
</p>
<p>
    Por favor recuerde que las contraseñas requieren mínimo de @Membership.MinRequiredPasswordLength caracteres de longitud.
</p>

<script class="alert error" src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script class="alert error" src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "")
    <div>
        <fieldset>
            <legend>Información de Cuenta</legend>

            <div class="editor-label">
                @Html.LabelFor(m => m.UserName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.UserName)
                @Html.ValidationMessageFor(m => m.UserName)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.Email)
            </div>

            <div class="editor-field">
                @Html.TextBoxFor(m => m.Email)
                @Html.ValidationMessageFor(m => m.Email)
                <div class="alert error">@TempData["Error"]</div>      
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>
            <div>&nbsp</div>
            <div>
                <input type="submit" value="Registrar" class="ebutton blue" />&nbsp
                @Html.ActionLink("Cancelar", "Index", "", null, htmlAttributes: new { @class = "ebutton blue" })
            </div>
           @* <div>
            <fb:login-button perms="email,user_checkins" autologoutlink="true">O registrate con tu cuenta de Facebook</fb:login-button>
            <div id="fb-root" style="display: inline; margin-right: 60px">
            </div>*@
        </fieldset>
    </div>
}
